Conversation
Base command from Empa
hannibal002
left a comment
There was a problem hiding this comment.
I am not happy with the design choices. Using any as object, calling all the utils classes that were previously extended functions from chat event via this, and the extraction of command objects so that the execute function only calls one more other function are verbose designs that don't fit in a modern Kotlin program
src/main/kotlin/at/hannibal2/skyhanni/discord/command/HelpCommand.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/at/hannibal2/skyhanni/discord/command/ServerCommands.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/at/hannibal2/skyhanni/discord/command/PullRequestCommand.kt
Outdated
Show resolved
Hide resolved
I thought that this would be a cleaner/more efficient way than just making two functions with basically the same purpose, do you know a way in which it could be done better? Or would you rather there be two functions for the same purpose?
"extraction of command objects"? wdym sorry |
Two functions doing the same thing would also be bad
|
|
aight I'm currently doing the first thing with a class, is there a difference between this and object? |
|
the idea is that the current logic doesnt change for command/feature classes. only in utils and the command init classes |
src/main/kotlin/at/hannibal2/skyhanni/discord/CommandListener.kt
Outdated
Show resolved
Hide resolved
hannibal002
left a comment
There was a problem hiding this comment.
Please fix the merge conflicts
|
@ILike2WatchMemes bump |


based on empas BaseCommand